import { requestdetail } from '@/api'
import { requestgoods } from '@/api'





const actions = {
    detail(context, value) {

        requestdetail(value).then(function(res) {
            context.commit('DETAIL', res.data.data)
        })
    },
    goodsnew(context, { id, number }) {
        console.log(id, number);
        requestgoods(id, number).then(function(res) {

        })

    },




}
const mutations = {
    DETAIL(state, value) {
        state.details = value

    }
}
const state = {
    details: {}
}
const getters = {
    categoryView(state) {
        return state.details.categoryView
    },
    skuInfo(state) {
        return state.details.skuInfo

    },
}

export default {
    actions,
    mutations,
    state,
    getters,
}